<div id="app" v-cloak>
    <div class="padding20">
        <el-form :model="form" label-width="auto" style="max-width: 600px">
            <el-form-item label="名称(中文)">
                <el-input v-model="form.title" />
            </el-form-item>
            <el-form-item label="上级">
                <mu-tree-select v-model="form.pid" :options="allList" value-field="id" label-field="title"></mu-tree-select>
            </el-form-item>
            <el-form-item label="标识(英文)">
                <el-input v-model="form.name" />
            </el-form-item>
            <el-form-item label="路由">
                <el-input v-model="form.route" />
            </el-form-item>
            <el-form-item label="模块">
                <el-select
                        v-model="form.module"
                        placeholder="请选择模块"
                        size="large"
                        style="width: 240px"
                >
                    <el-option
                            v-for="item in allAddons"
                            :key="item.value"
                            :label="item.title"
                            :value="item.value"
                    />
                </el-select>
            </el-form-item>
            <el-form-item label="图标">
                <mu-icon v-model="form.icon"></mu-icon>
            </el-form-item>
            <el-form-item label="描述">
                <el-input type="textarea" :rows="4" v-model="form.remark" />
            </el-form-item>
            <el-form-item label="菜单">
                <el-switch
                        v-model="form.ismenu"
                        :active-value="1"
                        :inactive-value="0"
                />
            </el-form-item>
            <el-form-item label="状态">
                <el-switch
                        v-model="form.status"
                        :active-value="1"
                        :inactive-value="0"
                />
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="onEditSubmit(form)">提交</el-button>
                <el-button @click="common.cancel()">取消</el-button>
            </el-form-item>
        </el-form>
    </div>
</div>